<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Display Table</title>
</head>
<body>
	<?php 
	include("dbUtils.php");
	$dbName = $_POST["dbName"];
	$dbTableName = $_POST["dbTableName"];
	$studentId = $_POST["studentId"];
	$firstName = $_POST["firstName"];
	$lastName = $_POST["lastName"];
	dbConnect();
	dbSelect($dbName);
	dbInsertNewStudent($dbTableName, $studentId, $firstName, $lastName);
	$result = mysql_query("SELECT * FROM $dbTableName");
	echo"<table>";
	echo "<tr><td> Today's Attendance for Ben Stein's English Class</td></tr>";
	while($row = mysql_fetch_row($result))
	{
		echo "<tr>";
		foreach($row as $cell)
			echo "<td>$cell</td>";

		echo "</tr>\n";
	}
	echo "</table>";
	mysql_free_result($result);
	?>
</body>
<input type="button" value="Index" onclick="location.href='index.html'"/>
<input type="button" value="Attendance" onclick="location.href='StudentAttendance.html'" />

</html>
